/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 头部样式 */
header {
    background-color: #4a6fa5;
    color: white;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

header h1 {
    font-size: 1.8rem;
}

/* GitHub链接样式 */
.github-link {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.github-link svg {
    margin-right: 5px;
    fill: white;
}

.github-link:hover {
    opacity: 0.8;
}

/* 主容器样式 */
.container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2rem;
    height: calc(100vh - 180px);
}

/* 输入和输出区域共享样式 */
.input-section,
.output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    height: 100%;
}

h2 {
    margin-bottom: 1rem;
    color: #4a6fa5;
    font-size: 1.3rem;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

button {
    padding: 0.5rem 1rem;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3a5a8c;
}

#clear-btn {
    background-color: #6c757d;
}

#clear-btn:hover {
    background-color: #5a6268;
}

#copy-btn {
    background-color: #28a745;
}

#copy-btn:hover {
    background-color: #218838;
}

/* 输入区域样式 */
#json-input {
    flex: 1;
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    resize: none;
}

#json-input:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

/* 输出区域样式 */
#json-output {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

footer a {
    color: #4a6fa5;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.author-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .input-section,
    .output-section {
        height: 400px;
    }
}